//
//  GoodDetailSecendVC.m
//  NormalFramework
//
//  Created by beisheng03 on 2018/3/10.
//  Copyright © 2018年 beisheng. All rights reserved.
//

#import "GoodDetailSecendVC.h"
#import <WebKit/WebKit.h>
#import "WKDelegetaController.h"
@interface GoodDetailSecendVC ()


@property (nonatomic, weak) WKWebView *webView;


@end

@implementation GoodDetailSecendVC




- (WKWebView *)webView{
    if (!_webView) {
        //配置环境
        WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc]init];
        
        
        WKWebView *webView = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH) configuration:config];
        
        
        _webView = webView;
        [self.view addSubview:webView];
        
    }
    
    return _webView;
    
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    if (@available(iOS 11.0, *)) {
        
        
        self.webView.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
        
    }
    
    
    
    self.webView.scrollView.contentInset = UIEdgeInsetsMake(IPhoneX ? 88 : 64, 0, IPhoneX ? 83 : 49, 0);

    
    self.webView.scrollView.scrollIndicatorInsets = self.webView.scrollView.contentInset;
    
    _urlString = @"https://view.inews.qq.com/a/TEC2018031000878203";
    
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urlString]]];
    

}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
